function getTimeSpan(start, end) {
  let dateStart = new Date(start.replace(/-/g, "/"));
  let dateEnd = new Date(end.replace(/-/g, "/"));
  let dateDiff = dateEnd.getTime() - dateStart.getTime();//时间差的毫秒数
  let minuteDiff = dateDiff / 1000
  return minuteDiff
}

let start = "2023-03-16 16:00:00"
let end = "2023-03-16 16:01:00"
console.log(getTimeSpan(start, end))


let dis = 146,//m
    sd = 200 * 1000 / (1 * 60 * 60),//m/s
    time = 899//s :实际用时
let costTime = dis / sd
console.log("costTime", costTime)//5.24s 地图用时
let speed = (899-691) / costTime / 10
console.log("speed==", speed)

// let str1 = 1678954634054, str2 = 1678954639304
// let span = (str2 - str1) / 1000 //5.25
// console.log(span)
// let dis = 291 //m
// let speed=dis/span //m/s
// speed=speed*60*60/1000
// console.log(speed) //199.5

